//
//  YZMKLinePacket.h
//  YZMicroStock
//
//  Created by wangminhong on 16/4/12.
//  Copyright © 2016年 cqjr. All rights reserved.
//

#import <Foundation/Foundation.h>

@class YZMKLineItem;

@interface YZMKLinePoint : NSObject

@property (nonatomic, assign) long long time;
@property (nonatomic, assign) double highest;
@property (nonatomic, assign) double lowest;
@property (nonatomic, assign) double open;
@property (nonatomic, assign) double close;
@property (nonatomic, assign) double amount;

@property (nonatomic, copy) NSArray *avgPoints;

@property (nonatomic, assign) BOOL rise;

- (NSString *)timeStr;

@end

@interface YZMKLinePacket : NSObject

@property (nonatomic, assign) NSInteger basicIndex;
@property (nonatomic, assign) NSInteger windowCount;

@property (nonatomic, assign, readonly) double maxPrice;
@property (nonatomic, assign, readonly) double minPrice;
@property (nonatomic, assign, readonly) double maxVolume;
@property (nonatomic, assign, readonly) BOOL hasData;
@property (nonatomic, assign, readonly) NSInteger itemCount;

- (void)setOriginItems: (NSArray *)items;
- (void)updateFromItems: (NSArray *)items;

- (NSArray *)klineDrawPoints;
- (YZMKLineItem *)itemOfIndex: (NSInteger)index;
- (void)clearData;

@end
